Exam 3




Part 1

The recreation of the graph:




Part 2

Building and displaying the summary model:

## # A tibble: 4 × 6
##   term         df     sumsq   meansq statistic    p.value
##   <chr>     <dbl>     <dbl>    <dbl>     <dbl>      <dbl>
## 1 Tier          3  8134277. 2711426.     746.   0        
## 2 ProfRank      2 16524385. 8262192.    2273.   0        
## 3 State        50  4625865.   92517.      25.5  2.83e-194
## 4 Residuals  3299 11990072.    3634.      NA   NA




#### Part 3

Tidying the ‘Juniper_Oils.csv’ data:

## Rows: 782
## Columns: 20
## $ SampleID               <chr> "LOG-16S-SL12", "LOG-16S-SL12", "LOG-16S-SL12",…
## $ Project                <chr> "JuniperLogs", "JuniperLogs", "JuniperLogs", "J…
## $ Amplicon               <chr> "16S", "16S", "16S", "16S", "16S", "16S", "16S"…
## $ Tree_Species           <chr> "Juniperus osteosperma", "Juniperus osteosperma…
## $ BurnYear               <dbl> 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018,…
## $ Latitude               <dbl> 41.5719, 41.5719, 41.5719, 41.5719, 41.5719, 41…
## $ Longitude              <dbl> -113.7488, -113.7488, -113.7488, -113.7488, -11…
## $ Field_Office           <chr> "Salt_Lake_3", "Salt_Lake_3", "Salt_Lake_3", "S…
## $ BLM_Fire_Name          <chr> "Ridge", "Ridge", "Ridge", "Ridge", "Ridge", "R…
## $ Tracking_Number        <chr> "#5276 (2018)", "#5276 (2018)", "#5276 (2018)",…
## $ Yield_percent          <dbl> 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, 0.18,…
## $ Bolt_Surface_Area_cm2  <dbl> 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687,…
## $ Raw_Exit_Holes_per_cm2 <dbl> 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000,…
## $ Raw_Exit_Holes         <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ Living_Larvae          <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ ChemTotal              <dbl> 87.7, 87.7, 87.7, 87.7, 87.7, 87.7, 87.7, 87.7,…
## $ ChemMean               <dbl> 3.813043, 3.813043, 3.813043, 3.813043, 3.81304…
## $ YearsSinceBurn         <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,…
## $ chemID                 <chr> "alpha-pinene", "para-cymene", "alpha-terpineol…
## $ concentration          <dbl> 0.6, 0.4, 2.3, 0.2, 1.9, 1.2, 25.9, 0.2, 0.4, 1…




Part 4

Making a graph showing chemical concentration vs. years since the trees were burned in a fire, and faceted by chemical ID:




#### Part 5

Using the generalized linear model to show which chemicals were significantly affected by the years since their host was burned:

term estimate std.error statistic p.value
chemIDalpha-cedrene 7.881098 1.9311625 4.081012 0.0000497
chemIDcedr-8-en-13-ol 7.619740 1.9311625 3.945675 0.0000872
chemIDcedrol 22.548238 1.9311625 11.675992 0.0000000
chemIDcis-thujopsene 17.277800 1.9311625 8.946839 0.0000000
chemIDwiddrol 5.815874 1.9311625 3.011592 0.0026878
YearsSinceBurn:chemIDcis-thujopsene 0.331832 0.1411097 2.351590 0.0189561